package com.cj.startup.simple

import android.app.Application
import com.cj.startup.Startup
import com.cj.startup.manager.StartupManager
import com.cj.startup.simple.task.*

class App : Application() {

    override fun onCreate() {
        super.onCreate()
        initStartup()
    }

    fun initStartup(){
        val list = mutableListOf<Startup<*>>()
        //list.add(Task4())
        list.add(Task4())
        list.add(Task5())
        list.add(Task1())
        list.add(Task3())
        list.add(Task2())
        StartupManager.Builder()
            .addAllStartup(list)
            .build(this)
            .start()
            .await()
        println("---------------init over")
    }

}